import  React,{Component} from 'react'
import "../../css/index/index_content.css"
import {Link} from 'react-router'
export  default  class IndexContent extends  Component{
    constructor(props){
        super(props)
        this.state={list:[]}
    }
    componentDidMount(){
        var list=this.props.getmsg()
        this.setState({
            list:list
        })
    }
    render(){
        return (
            <ul className="content_ul">
                {
                    this.state.list.map(function (v) {
                        return    <li key={v.id}>
                            <Link to={v.url}>
                                {v.name}
                            </Link>
                        </li>
                    })
                }
            </ul>
        )
    }
}